<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>总部</title>
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no;">
    <link rel="stylesheet" type="text/css" href="view/iwocar5/css/main.css" />
	<script src="view/iwocar5/js/jquery-1.11.1.min.js"></script>
	<script>
	$(function(){
		$("#market_as").click(function(){
			location.href="National_MarketDirector.php";
		});
		$("#sale_as").click(function(){
			location.href="National_SaleDirector.php";
		});
		$("#service_as").click(function(){
			location.href="National_ServiceDirector.php";
		});
		$("#all_top").click(function(){
			location.href="National_4SContrast.php";
		});
        $("#selectarea").change(function(){
            var province=$("#selectarea").children('option:selected').val();
            // console.log(province);
                $.post("National_AJAX.php",{act:'getpro',province:province},function(data){
                    $("#selectprovince").empty();
                    $("#selectprovince").prepend(data);
                });
        });
        $("#selectprovince").change(function(){
            var province=$("#selectprovince").children('option:selected').val();
                $.post("National_AJAX.php",{act:'getcitys',province:province},function(data){
                    $("#selectcity").empty();
                    $("#selectcity").prepend(data);
                })
        })
        $("#selectcity").change(function(){
            var city=$("#selectcity").children('option:selected').val();
                $.post("National_AJAX.php",{act:'get4S',city:city},function(data){
                    $("#address").empty();
                    $("#address").prepend(data);
                })
        })  
	/*	$("#all_check").click(function(){
			location.href="National_Manager.php";
		})		
		$("#datasubbtn").click(function(){
			var ad=$("#address").val();
			if(ad=="请选择经销商"){
				alert("请选择经销商");
			}else{
				location.href="4S_GManager.php?address="+ad;
			}
			
		})
		
			*/
		
	})
	</script>
</head>
<body>
<!--    <div class="header">
        <h5>总部</h5>
    </div>-->
    <div class="home-data">
        <h5>数据概况</h5>
        <ul>
            <li>
                <p>当前在店总数：<span><?php echo $allnow ?></span>人</p>
                <p>当天累计总数：<span><?php echo $allday ?></span>人</p>
            </li>
            <li>                
				<p>销售接待区：<span><?php echo $sale ?></span>人</p>
                <p>售后维修区：<span><?php echo $service ?></span>人</p>
            </li>
            <li>
                <p>首次进店：<span><?php echo $first ?></span>人</p>
                <p>二次及以上进店：<span><?php echo $second ?></span>人</p>
            </li>
            <li>
                <p>WIFI登录：<span><?php echo $login ?></span>人</p>
                <p>WIFI未登录：<span><?php echo $nolog ?></span>人</p>
            </li>
        </ul>
        <h6>历史累计进店总数：<?php echo $history ?>人</h6>
    </div>
    <ul class="headquarters">
        <li id="market_as">
            <h4><img src="view/iwocar5/images/market.png" alt="" /></h4>
            <p>市场数据分析</p>
        </li>
        <li id="sale_as">
            <img src="view/iwocar5/images/afterSale.png" alt="" />
            <p>销售<br />数据分析</p>
        </li>
        <li id="service_as">            
            <img src="view/iwocar5/images/sell.png" alt="" />
            <p>售后服务<br />数据分析</p>
        </li>
        <li>            
            <p id="all_top"><span><img src="view/iwocar5/images/comparison.png?v=1" alt="" style="height:30px;width:40px"/>全国4S店数据对比</span></p>
        </li>
		<!--<li>            
            <p id="all_check"><span><img src="view/iwocar5/images/datacheck.png?v=1" alt="" style="height:30px;width:40px"/>全国4S店数据查询</span></p>
        </li>-->
    </ul>
        <div class="headquarters-search">  
                
                <h5 class="sel seldata">
                    <span>区域：</span>
                    <div>
                        <!-- <i></i> -->
                        <select id="selectarea" class="sel-change">
                            <option value=北部区 selected="selected">北部区</option>
                            <option value=浙江区>浙江区</option>
                            <option value=南部区>南部区</option>
                            <option value=东北区>东北区</option>
                            <option value=东部区>东部区</option>
                            <option value=西部区>西部区</option>
                        </select>
                    </div>
                </h5>    
                <h5 class="sel seldata spec">
                    <span>省市：</span>
                    <div>
                        <!-- <i></i> -->
                        <select id="selectprovince" class="sel-change">
                            <option value=北京 selected="selected">北京</option>                  
                        </select>
                    </div>
                    <div>
                        <!-- <i></i> -->
                        <select id="selectcity" class="sel-change">
                          <option value="北京" selected="selected">北京</option>
                        </select>
                    </div>
                </h5>
                <form action="4S_GManager.php">     
                <h5 class="sel seldata">
                    <span>经销商：</span>
                    <div>
                        <!-- <i></i> -->
                        <select id="address" name="address" class="sel-change">
                            <option value='北京博瑞祥星汽车销售有限公司' selected="selected">北京博瑞祥星汽车销售有限公司</option>             
        				</select>
                    </div>
                </h5>      
                <a class="dataSub"  id="datasubbtn"><input type="submit" value="查询" style="background:transparent;width:100%;color:white;"></a>
            </form>
        </div>
    
</body>
</html>